function tower_ret_1() --ftag:if
	return tower_ret_truefalse(1)
end  
function tower_ret_2() --ftag:if
	return tower_ret_truefalse(2)
end  
function tower_ret_3() --ftag:if
	return tower_ret_truefalse(3)
end  
function tower_ret_4() --ftag:if
	return tower_ret_truefalse(4)
end  
function tower_ret_5() --ftag:if
	return tower_ret_truefalse(5)
end  

function tower_ret_truefalse(par) --ftag:if

	if par~= nil then 
	local mas
	local army=Logic.hero_lu_army()
	local unit_name,unit_count=Logic.army_get(army,tonumber(par))
	
	if (unit_name~=nil) and (unit_name~='') then return true end 
	end 
	return false
end  

function gen_hero_troop(par)

	if par~= nil then 

	local army=Logic.hero_lu_army()
	local unit_name,unit_count=Logic.army_get(army,tonumber(par))
	
	if unit_count == 1 then 
		return "(<label=cpsn_"..unit_name..">)"
	elseif count>1 then
		return "(<label=cpsn_"..unit_name..">: "..unit_count..")"
	end 
	
	end 
	return ""
	
end  

function store_hero_troop() --ftag:action 

	local army=Logic.hero_lu_army()
	Logic.hero_lu_var("tower_army",army)
	return false	
end  

function restore_hero_troop() --ftag:action 

	local army = Logic.hero_lu_var("tower_army")
	Logic.hero_lu_army(army)
	
	return false	
end 